package com.cg.controller;

import com.cg.service.StockService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/stock")
@RequiredArgsConstructor
public class StockController {

    private final StockService stockService;

    @GetMapping("/reduceStockNum/{stockId}/{stockType}")
    public void reduceStockNum(@PathVariable("stockId") Integer stockId,@PathVariable("stockType") Integer stockType){
        stockService.reduceStockNum(stockId,stockType);
    }

}
